package cn.iocoder.yudao.module.pay.dal.dataobject.order;

import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;

import java.math.BigDecimal;
import java.time.LocalDateTime;


/**
 * 订单支付详情表
 * (PayOrderDetail)实体类
 *
 * @author makejava
 * @since 2025-03-22 15:12:39
 */
@TableName("pay_order_detail")
@KeySequence("pay_order_detail_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库，可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PayOrderDetailDO extends BaseDO {

    /**
     * 支付订单编号
     */
    private Long id;
    /**
     * 流水号
     */
    private String no;
    /**
     * 支付id
     */
    private Long payId;
    /**
     * 渠道
     */
    private Integer channelType;
    /**
     * 渠道id
     */
    private Long channelId;
    /**
     * 调用信息
     */
    private String channelNotifyData;
    /**
     * 订单编号
     */
    private String orderNo;
    /**
     * 支付类型
     */
    private Integer payType;
    /**
     * 支付方式
     */
    private Integer payWay;
    /**
     * 支付金额
     */
    private BigDecimal payPrice;
    private BigDecimal price;
    /**
     * 支付状态
     */
    private Integer status;
    /**
     * 订单支付失效时间
     */
    private LocalDateTime expireTime;
    /**
     * 订单支付成功时间
     */
    private LocalDateTime successTime;

    private String  extendItem;

    @Data
    public static class ExtendPrice {
        private BigDecimal totalPrice;
        private BigDecimal deposit;
        private BigDecimal depositAdd;
        private BigDecimal delayPrice;
        private BigDecimal processPrice;
        private BigDecimal additionalPrice;
        private BigDecimal deductPrice;
    }

}

